package com.sise.stuteaintersys.mapper;

import com.sise.stuteaintersys.bean.entity.Exam;
import com.sise.stuteaintersys.bean.entity.ExamExample;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ExamMapper {
    int countByExample(ExamExample example);

    int deleteByExample(ExamExample example);

    int deleteByPrimaryKey(Integer id);

    @Delete("delete from exam where exam_type=#{type}")
    int deleteByExamType(String type);

    int insert(Exam record);
    /**
     * 批量插入
     *
     *@param
     *@return
     */
    int insertBatch(List<Exam> record);

    int insertSelective(Exam record);

    List<Exam> selectByExample(ExamExample example);
/*    *//**
     *  返回该课程的所有的试卷套
     *
     *@param courseId 课程编号
     *@return List<Exam> 试卷套
     *@date 2019/1/1
     *@time 22:52
     *//*
    @Select("select * from exam where exam_type=#{examType}")
    List<Exam> selectAllExam(String );*/

    Exam selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Exam record, @Param("example") ExamExample example);

    int updateByExample(@Param("record") Exam record, @Param("example") ExamExample example);

    int updateByPrimaryKeySelective(Exam record);

    int updateByPrimaryKey(Exam record);
}